<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
<title>2.13. odtone::mih::tlv_type_ Class Reference</title>
<link rel="stylesheet" href="../../../boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../../index.html" title="ODTONE 0.3">
<link rel="up" href="../index_mih.html" title="ODTONE MIH">
<link rel="prev" href="odtone_mih_is_oarchive_class.html" title="2.12. odtone::mih::is_oarchive Class Reference">
<link rel="next" href="odtone_mih_tlv_cast_class.html" title="2.14. odtone::mih::tlv_cast_&lt;T, TLV&gt; Class Reference">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"><img alt="'ODTONE - Open Dot Twenty One'" width="100" height="100" src="../../.././images/logo.png"></td></tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="odtone_mih_is_oarchive_class.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index_mih.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="odtone_mih_tlv_cast_class.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
<div class="section" title="2.13. odtone::mih::tlv_type_ Class Reference">
<div class="titlepage"><div><div><h4 class="title">
<a name="odtone.library.index_mih.odtone_mih_tlv_type_class"></a><a class="link" href="odtone_mih_tlv_type_class.html" title="2.13. odtone::mih::tlv_type_ Class Reference">
        2.13. odtone::mih::tlv_type_ Class Reference</a>
</h4></div></div></div>
<a name="odtone.library.index_mih.odtone_mih_tlv_type_class.detailed_description"></a><h6>
<a name="id3080938"></a>
          <a class="link" href="odtone_mih_tlv_type_class.html#odtone.library.index_mih.odtone_mih_tlv_type_class.detailed_description">Detailed
          Description</a>
        </h6>
<p>
          <span class="bold"><strong>TLV Type.</strong></span>
        </p>
<p>
          The MIH types support serialization and deserialization for the <a class="link" href="odtone_mih_iarchive_class.html" title="2.9. odtone::mih::iarchive Class Reference">odtone::mih::iarchive</a>
          and <a class="link" href="odtone_mih_oarchive_class.html" title="2.10. odtone::mih::oarchive Class Reference">odtone::mih::oarchive</a>,
          however those particular archives does not include the TLVs fields.
        </p>
<p>
          So <a class="link" href="odtone_mih_tlv_type_class.html" title="2.13. odtone::mih::tlv_type_ Class Reference">odtone::mih::tlv_type_</a>
          is responsible to manage TLVs and offers mechanisms to serialize and deserialize
          them.
        </p>
<p>
          There are 2 types of this class. However, since they are similar, we will
          explain them generically:
        </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc">
<li class="listitem">
            odtone::mih::tlv_type_&lt; T, TLV &gt;
          </li>
<li class="listitem">
            odtone::mih::tlv_type_&lt; boost::optional&lt; T &gt;, TLV &gt;
          </li>
</ul></div>
<a name="odtone.library.index_mih.odtone_mih_tlv_type_class.namespace"></a><h6>
<a name="id3081027"></a>
          <a class="link" href="odtone_mih_tlv_type_class.html#odtone.library.index_mih.odtone_mih_tlv_type_class.namespace">Namespace</a>
        </h6>
<p>
          
</p>
<pre class="programlisting"><span class="keyword">namespace</span> <span class="identifier">odtone</span><span class="special">::</span><span class="identifier">mih</span>
</pre>
<p>
        </p>
<a name="odtone.library.index_mih.odtone_mih_tlv_type_class.public_member_functions"></a><h6>
<a name="id3081079"></a>
          <a class="link" href="odtone_mih_tlv_type_class.html#odtone.library.index_mih.odtone_mih_tlv_type_class.public_member_functions">Public
          Member Functions</a>
        </h6>
<p>
          
</p>
<pre class="programlisting"><span class="identifier">tlv_type_</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">);</span>

<span class="keyword">void</span> <span class="identifier">serialize</span><span class="special">(</span><span class="identifier">iarchive</span><span class="special">&amp;</span> <span class="identifier">ar</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="keyword">void</span> <span class="identifier">serialize</span><span class="special">(</span><span class="identifier">oarchive</span><span class="special">&amp;</span> <span class="identifier">ar</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
</pre>
<p>
        </p>
<a name="odtone.library.index_mih.odtone_mih_tlv_type_class.constructor__amp__destructor_documentation"></a><h6>
<a name="id3081232"></a>
          <a class="link" href="odtone_mih_tlv_type_class.html#odtone.library.index_mih.odtone_mih_tlv_type_class.constructor__amp__destructor_documentation">Constructor
          &amp; Destructor Documentation</a>
        </h6>
<p>
          
</p>
<pre class="programlisting"><span class="identifier">tlv_type_</span><span class="special">(</span><span class="identifier">T</span><span class="special">&amp;</span> <span class="identifier">val</span><span class="special">);</span>
</pre>
<p>
        </p>
<p>
          Construct a TLV of a particular type.
        </p>
<p>
          <span class="bold"><strong>Parameters:</strong></span>
        </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
<span class="bold"><strong>val</strong></span> - value of the TLV.
          </li></ul></div>
<p>
          <span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span>
        </p>
<a name="odtone.library.index_mih.odtone_mih_tlv_type_class.member_function_documentation"></a><h6>
<a name="id3081441"></a>
          <a class="link" href="odtone_mih_tlv_type_class.html#odtone.library.index_mih.odtone_mih_tlv_type_class.member_function_documentation">Member
          Function Documentation</a>
        </h6>
<p>
          
</p>
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">serialize</span><span class="special">(</span><span class="identifier">iarchive</span><span class="special">&amp;</span> <span class="identifier">ar</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
</pre>
<p>
        </p>
<p>
          Deserialize the TLV type value from the input archive.
        </p>
<p>
          <span class="bold"><strong>Parameters:</strong></span>
        </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
<span class="bold"><strong>ar</strong></span> - <a class="link" href="odtone_mih_iarchive_class.html" title="2.9. odtone::mih::iarchive Class Reference">odtone::mih::iarchive</a>
            from where parse the TLV value.
          </li></ul></div>
<p>
          <span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span><span class="underline">_</span>
        </p>
<p>
          
</p>
<pre class="programlisting"><span class="keyword">void</span> <span class="identifier">serialize</span><span class="special">(</span><span class="identifier">oarchive</span><span class="special">&amp;</span> <span class="identifier">ar</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
</pre>
<p>
        </p>
<p>
          Serialize the TLV type value to the output archive.
        </p>
<p>
          <span class="bold"><strong>Parameters:</strong></span>
        </p>
<div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem">
<span class="bold"><strong>ar</strong></span> - <a class="link" href="odtone_mih_oarchive_class.html" title="2.10. odtone::mih::oarchive Class Reference">odtone::mih::oarchive</a>
            to where serialize the TLV value.
          </li></ul></div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright &#169; 2009 -2011 Universidade Aveiro<br>Copyright &#169; 2009 -2011 Instituto de Telecomunica&#231;&#245;es - P&#243;lo Aveiro<p>
        This software is distributed under a license. The full license agreement
        can be found in the LICENSE in this distribution. This software may not be
        copied, modified, sold or distributed other than expressed in the named license
        agreement. This software is distributed without any warranty.
      </p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="odtone_mih_is_oarchive_class.html"><img src="../../../../../doc/html/images/prev.png" alt="Prev"></a><a accesskey="u" href="../index_mih.html"><img src="../../../../../doc/html/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../doc/html/images/home.png" alt="Home"></a><a accesskey="n" href="odtone_mih_tlv_cast_class.html"><img src="../../../../../doc/html/images/next.png" alt="Next"></a>
</div>
</body>
</html>
